home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-13 | 787 b | 45 lines | [TEXT/EDIT] |
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class TEST_PRE_ONCE2
-
- creation make
-
- feature
-
- make is
- do
- is_true(max = 400);
- is_true(foo.is_equal("hip hop"));
- end;
-
- max: INTEGER is
- once
- Result := 200 * 2
- ensure
- meaningful: Result >= 127
- end
-
- foo: STRING is
- once
- Result := "hip hop";
- ensure
- Result.is_equal("hip hop");
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_PRE_ONCE2: ERROR Test # ");
- std_output.put_integer(cpt);
- std_output.put_string("%N");
- else
- -- std_output.put_string("Yes%N");
- end;
- end;
-
- cpt: INTEGER;
-
- end -- TEST_PRE_ONCE2
-